const React = require('react');
const ReactNative = require('react-native');
const {
    TouchableNativeFeedback,
    View,
    TouchableOpacity,
    Platform
} = ReactNative;

const TabBarButton = (props) => {
    if (Platform.OS == 'ios'){
        return <TouchableOpacity {...props}>
            {props.children}
        </TouchableOpacity>;

    } else {
        return <TouchableNativeFeedback
            delayPressIn={0}
            background={TouchableNativeFeedback.SelectableBackground()} // eslint-disable-line new-cap
            {...props}
        >
            {props.children}
        </TouchableNativeFeedback>;
    }

};

module.exports = TabBarButton;